package com.xianggu.designMode.chainMethod.demo03.impl;

import com.xianggu.designMode.chainMethod.demo03.Order;
import com.xianggu.designMode.chainMethod.demo03.OrderHandler;
import com.xianggu.designMode.chainMethod.demo03.OrderResult;

// 支付校验处理器
public class PaymentHandler extends OrderHandler {
    @Override
    protected OrderResult doHandle(Order order) {
        if (order.isPaid()) {
            return OrderResult.success();
        }
        return OrderResult.fail("支付未完成", "PaymentCheck");
    }
}